package com.wind.spring.cloud.alibaba.provider.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

@Configuration
public class ConsumerConfiguration {

    @Bean
    @LoadBalanced //  这个template具备负载均衡功能,调用服务其底层使用的是httpclient
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
